package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
* Author: ctj
* Date: 2022-09-30
* Time: 17:15
*/

/**
    * 订单表
    */
@ApiModel(value="订单表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ship_together.order_info")
public class OrderInfo implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="")
    private Long id;

    /**
     * 订单人数（座位数）
     */
    @TableField(value = "people_count")
    @ApiModelProperty(value="订单人数")
    private Integer peopleCount;

    /**
     * 订单航线类型
     */
    @TableField(value = "route_type")
    @ApiModelProperty(value="订单航线类型")
    private Integer routeType;

    /**
     * 订单总金额(分)
     */
    @TableField(value = "amount")
    @ApiModelProperty(value="订单总金额(分)")
    private Long amount;

    /**
     * 订单状态  0-未支付、1-已支付、2-出行中（船长核销完成后的订单状态）、3-已完成（行程结束时）、4-已取消、5-超时未支付
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value="订单状态  0-未支付、1-已支付、2-出行中（船长核销完成后的订单状态）、3-已完成（行程结束时）、4-已取消、5-超时未支付")
    private Integer status;

    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    @JsonIgnore
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    @JsonIgnore
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    @JsonIgnore
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    @JsonIgnore
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value="是否删除")
    @JsonIgnore
    private Boolean deleted;

    @TableField(exist = false)
    @ApiModelProperty(value = "预支付信息")
    private PrepayWithRequestPaymentResponse prepayWithRequestPaymentResponse;


    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PEOPLE_COUNT = "people_count";

    public static final String COL_ROUTE_TYPE = "route_type";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}